<div class="toggle sidebar-toggle" role="button">
  <span class="toggle-line"></span>
  <span class="toggle-line"></span>
  <span class="toggle-line"></span>
</div>
{{ $tocEnable := and .IsPage .Params.toc | default .Site.Params.toc.enable }}
<aside class="sidebar">
  <div class="sidebar-inner {{ if $tocEnable }}sidebar-nav-active sidebar-toc-active{{ else }}sidebar-overview-active{{ end }}">
    <ul class="sidebar-nav">
      <li class="sidebar-nav-toc">
        {{ T "Sidebar.label.toc" }}
      </li>
      <li class="sidebar-nav-overview">
        {{ T "Sidebar.label.overview" }}
      </li>
    </ul>
    <div class="sidebar-panel-container">
      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
        <div class="post-toc animated">{{ .TableOfContents }}</div>
      </div>
      <!--/noindex-->
      <div class="site-overview-wrap sidebar-panel">
        {{ partialCached "sidebar/overview.html" . }}
        
        {{ $custom := .Scratch.Get "sidebar" }}
        {{ if $custom }}
          {{ partialCached $custom . }}
        {{ end }}
      </div>
    </div>
  </div>

  {{ if .Site.Params.siteState.views.enable }}
    {{ partialCached "sidebar/siteinfo.html" . }}
  {{ end }}

  {{ if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
  <div class="sidebar-card-widget back-to-top-card">
    <div class="back-to-top animated" role="button" aria-label="{{ T "BackTop" }}">
      <i class="fa fa-arrow-up"></i>
      <span>0%</span>
    </div>
  </div>
  {{ end }}
</aside>
<div class="sidebar-dimmer"></div>
